<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::group(['domain' => 'b.qqucg.com'], function (){
    Route::get('/login', ['as' => 'login', 'uses' => 'biz\LoginController@login']);
    Route::post('/doLogin', ['as' => 'doLogin', 'uses' => 'biz\LoginController@login']);
    Route::any('/token', ['as' => 'token', 'uses' => 'common\CommonController@getToken']);
    Route::post('/upload', ['as' => 'upload', 'uses' => 'common\UploadController@uploadImage']);

    // -------------------------------------------------------------------------------------------------------------------------------
    // 首页订单开始
    Route::get('/', ['as' => '/', 'uses' => 'biz\IndexController@index']);
    // 首页订单结束
    // -------------------------------------------------------------------------------------------------------------------------------



    // -------------------------------------------------------------------------------------------------------------------------------
    // 餐台的管理开始
    Route::get('/table/index', ['as' => 'table/index', 'uses' => 'biz\TableController@index']);
    Route::get('/table/region', ['as' => 'table/region', 'uses' => 'biz\TableController@tableIndex']);
    Route::get('/table/region_info', ['as' => 'table/region_info', 'uses' => 'biz\TableController@tableRegionInfo']);
    Route::post('/table/region_edit', ['as' => 'table/region_info', 'uses' => 'biz\TableController@updateTableRegion']);
    Route::get('/table/del', ['as' => 'table/del', 'uses' => 'biz\TableController@delTableRegion']);
    Route::post('/table/add', ['as' => 'table/add', 'uses' => 'biz\TableController@addTableRegion']);
    Route::post('/table/add_table', ['as' => 'table/add_table', 'uses' => 'biz\TableController@addTable']);
    Route::get('/table/del_table', ['as' => 'table/del_table', 'uses' => 'biz\TableController@delTable']);
    Route::post('/table/edit_table', ['as' => 'table/edit_table', 'uses' => 'biz\TableController@editTable']);
    Route::get('/table/table_info', ['as' => 'table/table_info', 'uses' => 'biz\TableController@tableInfo']);
    // 餐台的管理结束
    // --------------------------------------------------------------------------------------------------------------------------------


    // --------------------------------------------------------------------------------------------------------------------------------
    // 菜品的管理开始
    Route::get('/goods/index', ['as' => 'goods/index', 'uses' => 'biz\GoodsController@index']);
    Route::post('/goods/update_goods', ['as' => 'goods/update_goods', 'uses' => 'biz\GoodsController@updateGoods']);
    Route::get('/goods/sgc', ['as' => 'goods/sgc', 'uses' => 'biz\GoodsController@getSgcList']);
    Route::post('/goods/add', ['as' => 'goods/add', 'uses' => 'biz\GoodsController@addGoodsInfo']);
    Route::post('/goods/add_store_goods_class', ['as' => 'goods/add_store_goods_class', 'uses' => 'biz\GoodsController@addStoreGoodsClass']);
    Route::post('/goods/del_store_goods_class', ['as' => 'goods/del_store_goods_class', 'uses' => 'biz\GoodsController@delStoreGoodsClass']);
    Route::post('/goods/edit_store_goods_class', ['as' => 'goods/edit_store_goods_class', 'uses' => 'biz\GoodsController@editStoreGoodsClass']);
    // 菜品的管理结束
    // --------------------------------------------------------------------------------------------------------------------------------
});
